package com.grade.service.Impl;

import com.grade.Beans.GradeSum;
import com.grade.Beans.Student;
import com.grade.mapper.StudentMapper;
import com.grade.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;
@Service(value = "studentServiceImpl")
public class StudentServiceImpl implements StudentService {
    @Autowired
 StudentMapper studentMapper;
    @Override
    public List<Student> FindAll() {
        return studentMapper.FindAll();
    }

    @Override
    public int deleteByStudentNo(String[] nos) {
        return studentMapper.deleteByStudentNo(nos);
    }

    @Override
    public int addStudentSum(List<Student> studentList) {
        return studentMapper.addStudentSum(studentList);
    }

    @Override
    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public Student findByStudentNa(String studentName) {
        return studentMapper.findByStudentNa(studentName);
    }

    @Override
    public List<Student> findByStudentPage(Map map) {
        return studentMapper.findByStudentPage(map);
    }

    @Override
    public int findByStudent(Map map) {
        return studentMapper.findByStudent(map);
    }

    @Override
    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public Student findByStudentNo(int studentNo) {
        return studentMapper.findByStudentNo(studentNo);
    }

    @Override
    public int deleteStudent(int studentNo) {
        return studentMapper.deleteStudent(studentNo);
    }

    @Override
    public Student login(int studentNo, String stuPass) {
        return studentMapper.login(studentNo,stuPass);
    }

    @Override
    public List<GradeSum> scoressum() {
        return studentMapper.scoressum();
    }

    @Override
    public List<GradeSum> scoresstudent(int studentNo) {
        return studentMapper.scoresstudent(studentNo);
    }

    @Override
    public int updatepassword(int id, String pwd1) {
        return studentMapper.updatepassword(id,pwd1);
    }
/**
 * set方法注入对象
 * public void setStudentMapper(StudentMapper studentMapper) {
 *         this.studentMapper = studentMapper;
 *     }
 * */

}
